﻿@model Model.INVENTORY

<div class="modal fade" id="invCreateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Dodawanie nowego nauczyciela</h4>
            </div>
            <div class="modal-body">
                @using (Html.BeginForm("Create", "Inventory", FormMethod.Post))
                {
                    @Html.AntiForgeryToken()

                    @Html.ValidationSummary(true, "", new {@class = "text-danger"})
                    @Html.HiddenFor(model => model.INVENTORYID)

                    <div class="form-group">
                        <label for="recipient-name" class="control-label">Nazwa:</label>
                        @Html.EditorFor(model => model.NAME, new {htmlAttributes = new {@class = "form-control"}})
                    </div>

                    <div class="form-group">
                        <label for="recipient-name" class="control-label">Zakład:</label>
                        @Html.EditorFor(model => model.PLANT, new {htmlAttributes = new {@class = "form-control"}})
                    </div>

                    <div class="form-group">
                        <div class="form-group">
                            <label>Okres od:</label>
                            <div class="input-group">
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                @*<input type="text" class="form-control" data-inputmask="'alias': 'dd/mm/yyyy'" data-mask>*@
                                @Html.EditorFor(model => model.PERIOD_FROM, new
                                {
                                    htmlAttributes = new
                                    {
                                        @class = "form-control",
                                        @id = "data1"
                                    }
                                })
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="recipient-name" class="control-label">Okres do:</label>
                        @Html.EditorFor(model => model.PERIOD_TO, new {htmlAttributes = new {@class = "form-control"}})
                    </div>

                    <div class="modal-footer">
                        <input type="submit" value="Zapisz" class="btn btn-default"/>
                    </div>                
                }
            </div>
        </div>
    </div>
</div>
<script>
    $('#data1').datepicker({
        dateFormat: 'dd-mm-yy',
        minDate: '+5d',
        changeMonth: true,
        changeYear: true,
        altField: "#idTourDateDetailsHidden",
        altFormat: "yy-mm-dd"
    });
</script>
